/*
package com.company.common.config;

import com.netflix.client.ClientException;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RabbitListener(queues = "sms")
public class SmsListener {

//    @Resource
//    private SmsUtil smsUtil;
//
//    //@Value("${aliyun.sms.template_code}")
//    private String template_code="SMS_174022034";//模板编号
//    //@Value("${aliyun.sms.sign_name}")
//    private String sign_name="无人机平台";//签名
//    @RabbitHandler
//    public void smsCode(Map<String, String> message) {
//        System.out.println("手机号：" + message.get("mobile"));
//        System.out.println("验证码：" + message.get("code"));
//        try {                                                              //这里的可以要和模板中写的key一样才行
//            smsUtil.sendSms(message.get("mobile"),template_code,sign_name, " {\"code\":\""+ message.get("code") +"\"}"); }
//        catch (ClientException e) { e.printStackTrace(); } }
}
*/
